|
|
|
|
|
|
|
Before distributing an application, you should also select an icon from the Make tab of the Project Properties dialog box. Although an icon is not critical, using one is an easy way to make your application appear more professional. All you have to do is assign an icon to a form and then select the form name from the Icon drop-down box. |
|
|
|
|
|
|
|
|
Preparing to Create a Setup Program |
|
|
|
|
|
|
|
|
After you successfully compile your application, test the compiled version on your own computer to make sure that it runs outside the Visual Basic IDE. For a Standard EXE project, run the executable from the Windows Explorer. For an ActiveX component, attempt to use the component in a Visual Basic project or Web page. Before distributing the application to multiple users, you also need to perform more thorough testing on a PC other than your own. |
|
|
|
|
|
|
|
|
I also suggest compiling your project to a different directory than the one you have been using. Doing so may help you discover any additional files (for example, INI files or bitmaps) that you have programmed the application to access. After you have made a note of these files and created a working compiled application, you are ready for the next stepusing the Package and Deployment Wizard. |
|
|
|
|
|
|
|
|
Packaging a Standard EXE Project |
|
|
|
|
|
|
|
|
Even though you may have just compiled your code into an executable file, that executable file cannot run on its own. Users of your program must have some VB runtime files (for example, DLLs) properly installed first. In the days of VB 3.0, sometimes copying the file VBRUN300.DLL and copying your EXE were the only steps required. Today, the mere presence of a required DLL file is usually not enough; more often than not, it must also be registered in the Windows Registry. |
|
|
|
|
|
|
|
|
On the bright side, the setup utility included with Visual Basic has improved in quality with each successive release. The latest incarnation of this utility, now known as the Package and Deployment Wizard, is the best yet. It has a totally redesigned interface that includes some additional customization features not present in previous versions. The purpose of this wizard is to ''package" your program with the required support files so that it can be installed from a disk, directory, or the Internetjust like any off-the-shelf program. |
|
|
|
|
|
|
|
|
Creating a Standard EXE Package |
|
|
|
|
|
|
|
|
A shortcut to the Package and Deployment Wizard should have been installed with VB. The main screen, pictured in Figure B.2, is the starting point for creating installation routines for any type of Visual Basic project. This section focuses on the steps for a Standard EXE project. If you want to use this section as a step-by-step example, you first need to create a simple Standard EXE project and then save and compile it. Then start the Package and Deployment Wizard. |
|
|
|
|
|